
#include <iostream>

using namespace std;

#include "XDSC.h"

#define FALSE	0
#define TRUE	1

#define CUALDICT	FALSE
#define CSALDICT	TRUE
#define CLLDICT		FALSE


typedef int KeyType;
struct Cmd{
	int cmdToken;
	char *name;
	bool operator<(const Cmd &n2)const
	{return cmdToken < n2.cmdToken;}
	bool operator==(int n2)const
	{return cmdToken == n2;}
};

ostream& operator<<(ostream& o, const Cmd& c)
{
	o<<c.name;
	return o;
}

#if CUALDICT
	#include "CUlist.h"
	typedef CUList<Cmd> CDict;
#endif

#if CSALDICT
	#include "CSAList.h"
	typedef CSAList<Cmd> CDict;
#endif

#if CLLDICT
	#include "CLList.h"
	typedef CLList<Cmd> CDict;
#endif

typedef CDict::iterator CDItor;

int main()
{
	CDict dict;

	Cmd temp;
	temp.cmdToken = 1;
	temp.name = "hello";
	
	dict.append(temp);
	
	Xfind(dict.begin(),dict.end(),1);
	return 0;
}

/*
int main()
{
	CDict dict;

	Cmd temp;
	temp.cmdToken = 1;
	temp.name = "hello";
	
	dict.append(temp);
	
	CDItor p = Xfind_if(dict.begin(),dict.end()-1,XFequal<int>(1));
	
//	p = Xbinary_search_if(dict.begin(),dict.end()-1,CKECmp(1));
	if(p!=dict.end()){
		cout<<"successful!\n"<<*p<<endl;
	}
	
	dict.remove(p);
	
	p = Xfind_if(dict.begin(),dict.end(),XFequal<int>(1));
	if(p!=dict.end()){
		cout<<"error"<<*p<<endl;
	}
	
	Xfind_if(dict.begin(),dict.end(),XFequal<int>(1));
}
*/
